<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: libemb::CoScheduler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>libemb</b></li><li class="navelem"><a class="el" href="classlibemb_1_1_co_scheduler.html">CoScheduler</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlibemb_1_1_co_scheduler-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libemb::CoScheduler Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>协程调度器  
 <a href="classlibemb_1_1_co_scheduler.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_coroutine_8h_source.html">Coroutine.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acec8efe9475154f54e3714954bfe7739"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_co_scheduler.html#acec8efe9475154f54e3714954bfe7739">start</a> (std::shared_ptr&lt; <a class="el" href="classlibemb_1_1_coroutine.html">Coroutine</a> &gt; coroutine)</td></tr>
<tr class="memdesc:acec8efe9475154f54e3714954bfe7739"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动协程  <a href="classlibemb_1_1_co_scheduler.html#acec8efe9475154f54e3714954bfe7739">More...</a><br /></td></tr>
<tr class="separator:acec8efe9475154f54e3714954bfe7739"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a723316c1527d381780a014e1fa04d073"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_co_scheduler.html#a723316c1527d381780a014e1fa04d073">schedule</a> (int coroutineID)</td></tr>
<tr class="memdesc:a723316c1527d381780a014e1fa04d073"><td class="mdescLeft">&#160;</td><td class="mdescRight">调度协程  <a href="classlibemb_1_1_co_scheduler.html#a723316c1527d381780a014e1fa04d073">More...</a><br /></td></tr>
<tr class="separator:a723316c1527d381780a014e1fa04d073"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a663b9e4fc25a50033814b0b0201ab34e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_co_scheduler.html#a663b9e4fc25a50033814b0b0201ab34e">stop</a> (int coroutineID)</td></tr>
<tr class="memdesc:a663b9e4fc25a50033814b0b0201ab34e"><td class="mdescLeft">&#160;</td><td class="mdescRight">停止协程  <a href="classlibemb_1_1_co_scheduler.html#a663b9e4fc25a50033814b0b0201ab34e">More...</a><br /></td></tr>
<tr class="separator:a663b9e4fc25a50033814b0b0201ab34e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7f935a73bed46720a483f4c76945548"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_co_scheduler.html#af7f935a73bed46720a483f4c76945548">routines</a> ()</td></tr>
<tr class="memdesc:af7f935a73bed46720a483f4c76945548"><td class="mdescLeft">&#160;</td><td class="mdescRight">查询当前协程个数  <a href="classlibemb_1_1_co_scheduler.html#af7f935a73bed46720a483f4c76945548">More...</a><br /></td></tr>
<tr class="separator:af7f935a73bed46720a483f4c76945548"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6d7cffae8f21229acc643f6101b7338"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_co_scheduler.html#ad6d7cffae8f21229acc643f6101b7338">context</a> ()</td></tr>
<tr class="memdesc:ad6d7cffae8f21229acc643f6101b7338"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回协程上下文  <a href="classlibemb_1_1_co_scheduler.html#ad6d7cffae8f21229acc643f6101b7338">More...</a><br /></td></tr>
<tr class="separator:ad6d7cffae8f21229acc643f6101b7338"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad10cb5db53c8c54d984a2d2ff5f5f238"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_co_scheduler.html#ad10cb5db53c8c54d984a2d2ff5f5f238">stack</a> ()</td></tr>
<tr class="memdesc:ad10cb5db53c8c54d984a2d2ff5f5f238"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回协程堆栈空间  <a href="classlibemb_1_1_co_scheduler.html#ad10cb5db53c8c54d984a2d2ff5f5f238">More...</a><br /></td></tr>
<tr class="separator:ad10cb5db53c8c54d984a2d2ff5f5f238"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>协程调度器 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ad6d7cffae8f21229acc643f6101b7338"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6d7cffae8f21229acc643f6101b7338">&#9670;&nbsp;</a></span>context()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void * libemb::CoScheduler::context </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回协程上下文 </p>
<dl class="section return"><dt>Returns</dt><dd>void* </dd></dl>

</div>
</div>
<a id="af7f935a73bed46720a483f4c76945548"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7f935a73bed46720a483f4c76945548">&#9670;&nbsp;</a></span>routines()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::CoScheduler::routines </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>查询当前协程个数 </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a id="a723316c1527d381780a014e1fa04d073"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a723316c1527d381780a014e1fa04d073">&#9670;&nbsp;</a></span>schedule()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libemb::CoScheduler::schedule </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>coroutineID</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>调度协程 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">coroutineID</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad10cb5db53c8c54d984a2d2ff5f5f238"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad10cb5db53c8c54d984a2d2ff5f5f238">&#9670;&nbsp;</a></span>stack()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * libemb::CoScheduler::stack </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回协程堆栈空间 </p>
<dl class="section return"><dt>Returns</dt><dd>char* </dd></dl>

</div>
</div>
<a id="acec8efe9475154f54e3714954bfe7739"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acec8efe9475154f54e3714954bfe7739">&#9670;&nbsp;</a></span>start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::CoScheduler::start </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="classlibemb_1_1_coroutine.html">Coroutine</a> &gt;&#160;</td>
          <td class="paramname"><em>coroutine</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>启动协程 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">coroutine</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

</div>
</div>
<a id="a663b9e4fc25a50033814b0b0201ab34e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a663b9e4fc25a50033814b0b0201ab34e">&#9670;&nbsp;</a></span>stop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libemb::CoScheduler::stop </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>coroutineID</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>停止协程 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">coroutineID</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_coroutine_8h_source.html">Coroutine.h</a></li>
<li>src/Coroutine.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
